.class public Lcom/opongo/android/custom/SpicyDealsAddActivity;
.super Landroid/app/Activity;
.source "SpicyDealsAddActivity.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/opongo/android/custom/SpicyDealsAddActivity$sendDealAsyncTask;
    }
.end annotation


# static fields
#the value of this static final field might be set in the static constructor
.field public static final DEBUG:Z = false

.field public static final PREFS_NAME:Ljava/lang/String; = "BlogApp"

.field private static final SELECT_PICTURE:I = 0x0

.field private static final TAG:Ljava/lang/String; = null

.field private static final TAKE_PHOTO_CODE:I = 0x1


# instance fields
.field private apiManager:Lcom/opongo/blogapp/manager/APIManager;

.field private captureBmp:Landroid/graphics/Bitmap;

.field private editor:Landroid/content/SharedPreferences$Editor;

.field private progressDialog:Landroid/app/ProgressDialog;

.field private settings:Landroid/content/SharedPreferences;

.field private spicydeals_cat:Landroid/widget/Spinner;

.field private spicydeals_code:Landroid/widget/EditText;

.field private spicydeals_content:Landroid/widget/EditText;

.field private spicydeals_date:Landroid/widget/EditText;

.field private spicydeals_discount:Landroid/widget/EditText;

.field private spicydeals_email:Landroid/widget/EditText;

.field private spicydeals_image:Landroid/widget/ImageView;

.field private spicydeals_link:Landroid/widget/EditText;

.field private spicydeals_name:Landroid/widget/EditText;

.field private spicydeals_place:Landroid/widget/EditText;

.field private spicydeals_price:Landroid/widget/EditText;

.field private spicydeals_title:Landroid/widget/EditText;

.field private spicydeals_type:Landroid/widget/Spinner;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 45
    sget-boolean v0, Lcom/opongo/blogapp/AbaSettings;->DEBUG:Z

    sput-boolean v0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->DEBUG:Z

    .line 46
    const-class v0, Lcom/opongo/android/custom/SpicyDealsAddActivity;

    .line 47
    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    .line 46
    sput-object v0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->TAG:Ljava/lang/String;

    .line 43
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 43
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method

.method static synthetic access$0()Ljava/lang/String;
    .locals 1

    .prologue
    .line 46
    sget-object v0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->TAG:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$1(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Lcom/opongo/blogapp/manager/APIManager;
    .locals 1
    .parameter

    .prologue
    .line 44
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->apiManager:Lcom/opongo/blogapp/manager/APIManager;

    return-object v0
.end method

.method static synthetic access$10(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 63
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_place:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$11(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/Spinner;
    .locals 1
    .parameter

    .prologue
    .line 66
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_cat:Landroid/widget/Spinner;

    return-object v0
.end method

.method static synthetic access$12(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/Spinner;
    .locals 1
    .parameter

    .prologue
    .line 67
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_type:Landroid/widget/Spinner;

    return-object v0
.end method

.method static synthetic access$13(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/graphics/Bitmap;
    .locals 1
    .parameter

    .prologue
    .line 74
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->captureBmp:Landroid/graphics/Bitmap;

    return-object v0
.end method

.method static synthetic access$14(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/app/ProgressDialog;
    .locals 1
    .parameter

    .prologue
    .line 53
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->progressDialog:Landroid/app/ProgressDialog;

    return-object v0
.end method

.method static synthetic access$15(Lcom/opongo/android/custom/SpicyDealsAddActivity;Ljava/lang/String;Ljava/lang/String;Z)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 246
    invoke-direct {p0, p1, p2, p3}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->showAlert(Ljava/lang/String;Ljava/lang/String;Z)V

    return-void
.end method

.method static synthetic access$16(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/content/SharedPreferences$Editor;
    .locals 1
    .parameter

    .prologue
    .line 51
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->editor:Landroid/content/SharedPreferences$Editor;

    return-object v0
.end method

.method static synthetic access$2(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 55
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_name:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$3(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 56
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_title:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$4(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 57
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_content:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$5(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 58
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_price:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$6(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 59
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_link:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$7(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 60
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_date:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$8(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 61
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_code:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$9(Lcom/opongo/android/custom/SpicyDealsAddActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 62
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_discount:Landroid/widget/EditText;

    return-object v0
.end method

.method private getTempFile(Landroid/content/Context;)Ljava/io/File;
    .locals 3
    .parameter "context"

    .prologue
    .line 336
    new-instance v0, Ljava/io/File;

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v1

    .line 337
    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    .line 336
    invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 338
    .local v0, path:Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-nez v1, :cond_0

    .line 339
    invoke-virtual {v0}, Ljava/io/File;->mkdir()Z

    .line 341
    :cond_0
    new-instance v1, Ljava/io/File;

    const-string v2, "image.tmp"

    invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    return-object v1
.end method

.method private isEmtpy([Landroid/widget/EditText;)Z
    .locals 13
    .parameter "e"

    .prologue
    const/4 v6, 0x1

    const/4 v7, 0x0

    .line 118
    const-string v5, ""

    .line 120
    .local v5, message:Ljava/lang/String;
    :try_start_0
    array-length v9, p1
    :try_end_0
    .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_0

    move v8, v7

    :goto_0
    if-lt v8, v9, :cond_0

    .line 132
    :goto_1
    const-string v8, ""

    invoke-virtual {v5, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-nez v8, :cond_2

    .line 134
    new-instance v1, Landroid/app/AlertDialog$Builder;

    invoke-direct {v1, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 135
    .local v1, builder:Landroid/app/AlertDialog$Builder;
    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "Folgende Felder fehlen noch:\n"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v7, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v1, v7}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v7

    .line 136
    invoke-virtual {v7, v6}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

    .line 137
    invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    .line 138
    .local v0, alert:Landroid/app/AlertDialog;
    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    .line 141
    .end local v0           #alert:Landroid/app/AlertDialog;
    .end local v1           #builder:Landroid/app/AlertDialog$Builder;
    :goto_2
    return v6

    .line 120
    :cond_0
    :try_start_1
    aget-object v2, p1, v8

    .line 121
    .local v2, editText:Landroid/widget/EditText;
    invoke-virtual {v2}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v10

    invoke-interface {v10}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v3

    .line 122
    .local v3, edit_text:Ljava/lang/String;
    const-string v10, "\n"

    const-string v11, ""

    invoke-virtual {v3, v10, v11}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    const-string v11, "\r"

    const-string v12, ""

    invoke-virtual {v10, v11, v12}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    const-string v11, "\t"

    const-string v12, ""

    invoke-virtual {v10, v11, v12}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    const-string v11, " "

    const-string v12, ""

    invoke-virtual {v10, v11, v12}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    const-string v11, "http://"

    const-string v12, ""

    invoke-virtual {v10, v11, v12}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 123
    const-string v10, ""

    invoke-virtual {v3, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    if-eqz v10, :cond_1

    .line 124
    new-instance v10, Ljava/lang/StringBuilder;

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v11

    invoke-direct {v10, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v11, " - "

    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v10

    invoke-virtual {v2}, Landroid/widget/EditText;->getContentDescription()Ljava/lang/CharSequence;

    move-result-object v11

    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v10

    const-string v11, "\n"

    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v10

    invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_1
    .catch Ljava/lang/NullPointerException; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v5

    .line 120
    :cond_1
    add-int/lit8 v8, v8, 0x1

    goto/16 :goto_0

    .line 127
    .end local v2           #editText:Landroid/widget/EditText;
    .end local v3           #edit_text:Ljava/lang/String;
    :catch_0
    move-exception v4

    .line 128
    .local v4, ex:Ljava/lang/NullPointerException;
    invoke-virtual {v4}, Ljava/lang/NullPointerException;->printStackTrace()V

    goto/16 :goto_1

    .end local v4           #ex:Ljava/lang/NullPointerException;
    :cond_2
    move v6, v7

    .line 141
    goto :goto_2
.end method

.method private showAlert(Ljava/lang/String;Ljava/lang/String;Z)V
    .locals 3
    .parameter "title"
    .parameter "text"
    .parameter "onBackPressed"

    .prologue
    .line 247
    new-instance v1, Landroid/app/AlertDialog$Builder;

    invoke-direct {v1, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    .line 248
    .local v0, alertDialog:Landroid/app/AlertDialog;
    invoke-virtual {v0, p1}, Landroid/app/AlertDialog;->setTitle(Ljava/lang/CharSequence;)V

    .line 249
    invoke-virtual {v0, p2}, Landroid/app/AlertDialog;->setMessage(Ljava/lang/CharSequence;)V

    .line 250
    const v1, 0x7f020009

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setIcon(I)V

    .line 252
    if-eqz p3, :cond_0

    .line 253
    const-string v1, "OK"

    new-instance v2, Lcom/opongo/android/custom/SpicyDealsAddActivity$1;

    invoke-direct {v2, p0}, Lcom/opongo/android/custom/SpicyDealsAddActivity$1;-><init>(Lcom/opongo/android/custom/SpicyDealsAddActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog;->setButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 267
    :goto_0
    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    .line 268
    return-void

    .line 260
    :cond_0
    const-string v1, "OK"

    new-instance v2, Lcom/opongo/android/custom/SpicyDealsAddActivity$2;

    invoke-direct {v2, p0}, Lcom/opongo/android/custom/SpicyDealsAddActivity$2;-><init>(Lcom/opongo/android/custom/SpicyDealsAddActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog;->setButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    goto :goto_0
.end method


# virtual methods
.method public getPath(Landroid/net/Uri;)Ljava/lang/String;
    .locals 8
    .parameter "uri"

    .prologue
    const/4 v3, 0x0

    .line 319
    const/4 v0, 0x1

    new-array v2, v0, [Ljava/lang/String;

    const/4 v0, 0x0

    const-string v1, "_data"

    aput-object v1, v2, v0

    .local v2, projection:[Ljava/lang/String;
    move-object v0, p0

    move-object v1, p1

    move-object v4, v3

    move-object v5, v3

    .line 320
    invoke-virtual/range {v0 .. v5}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 322
    .local v7, cursor:Landroid/database/Cursor;
    const-string v0, "_data"

    invoke-interface {v7, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v6

    .line 323
    .local v6, column_index:I
    invoke-interface {v7}, Landroid/database/Cursor;->moveToFirst()Z

    .line 324
    invoke-interface {v7, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public onActivityResult(IILandroid/content/Intent;)V
    .locals 5
    .parameter "requestCode"
    .parameter "resultCode"
    .parameter "data"

    .prologue
    .line 284
    const/4 v2, 0x0

    .line 286
    .local v2, selectedImageUri:Landroid/net/Uri;
    const/4 v3, -0x1

    if-ne p2, v3, :cond_0

    .line 287
    packed-switch p1, :pswitch_data_0

    .line 301
    :cond_0
    :goto_0
    if-nez v2, :cond_1

    .line 316
    :goto_1
    return-void

    .line 289
    :pswitch_0
    invoke-direct {p0, p0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->getTempFile(Landroid/content/Context;)Ljava/io/File;

    move-result-object v1

    .line 290
    .local v1, file:Ljava/io/File;
    invoke-static {v1}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v2

    .line 291
    goto :goto_0

    .line 293
    .end local v1           #file:Ljava/io/File;
    :pswitch_1
    invoke-virtual {p3}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v2

    .line 295
    goto :goto_0

    .line 307
    :cond_1
    :try_start_0
    invoke-virtual {p0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    invoke-static {v3, v2}, Landroid/provider/MediaStore$Images$Media;->getBitmap(Landroid/content/ContentResolver;Landroid/net/Uri;)Landroid/graphics/Bitmap;

    move-result-object v3

    .line 306
    iput-object v3, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->captureBmp:Landroid/graphics/Bitmap;

    .line 308
    iget-object v3, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_image:Landroid/widget/ImageView;

    iget-object v4, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->captureBmp:Landroid/graphics/Bitmap;

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V
    :try_end_0
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

    goto :goto_1

    .line 309
    :catch_0
    move-exception v0

    .line 311
    .local v0, e:Ljava/io/FileNotFoundException;
    invoke-virtual {v0}, Ljava/io/FileNotFoundException;->printStackTrace()V

    goto :goto_1

    .line 312
    .end local v0           #e:Ljava/io/FileNotFoundException;
    :catch_1
    move-exception v0

    .line 314
    .local v0, e:Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_1

    .line 287
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public onClickGetdDealImage(Landroid/view/View;)V
    .locals 3
    .parameter "btn"

    .prologue
    .line 271
    sget-object v1, Lcom/opongo/android/custom/SpicyDealsAddActivity;->TAG:Ljava/lang/String;

    const-string v2, "AddCommentClicked"

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 275
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 276
    .local v0, intent:Landroid/content/Intent;
    const-string v1, "image/*"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 277
    const-string v1, "android.intent.action.GET_CONTENT"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 278
    const-string v1, "Select Picture"

    invoke-static {v0, v1}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;

    move-result-object v1

    .line 279
    const/4 v2, 0x0

    .line 278
    invoke-virtual {p0, v1, v2}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->startActivityForResult(Landroid/content/Intent;I)V

    .line 280
    return-void
.end method

.method public onClickSendDeal(Landroid/view/View;)V
    .locals 6
    .parameter "btn"

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 146
    sget-object v1, Lcom/opongo/android/custom/SpicyDealsAddActivity;->TAG:Ljava/lang/String;

    const-string v2, "AddCommentClicked"

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 148
    const/4 v1, 0x5

    new-array v0, v1, [Landroid/widget/EditText;

    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_name:Landroid/widget/EditText;

    aput-object v1, v0, v4

    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_email:Landroid/widget/EditText;

    aput-object v1, v0, v5

    const/4 v1, 0x2

    iget-object v2, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_link:Landroid/widget/EditText;

    aput-object v2, v0, v1

    const/4 v1, 0x3

    iget-object v2, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_content:Landroid/widget/EditText;

    aput-object v2, v0, v1

    const/4 v1, 0x4

    iget-object v2, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_price:Landroid/widget/EditText;

    aput-object v2, v0, v1

    .line 150
    .local v0, e:[Landroid/widget/EditText;
    invoke-direct {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->isEmtpy([Landroid/widget/EditText;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 166
    :goto_0
    return-void

    .line 154
    :cond_0
    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->editor:Landroid/content/SharedPreferences$Editor;

    const-string v2, "edit_name"

    iget-object v3, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_name:Landroid/widget/EditText;

    invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-interface {v3}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 155
    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->editor:Landroid/content/SharedPreferences$Editor;

    const-string v2, "edit_email"

    iget-object v3, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_email:Landroid/widget/EditText;

    invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-interface {v3}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 157
    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->editor:Landroid/content/SharedPreferences$Editor;

    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 159
    new-instance v1, Landroid/app/ProgressDialog;

    invoke-direct {v1, p0}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->progressDialog:Landroid/app/ProgressDialog;

    .line 160
    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->progressDialog:Landroid/app/ProgressDialog;

    const v2, 0x7f070054

    invoke-virtual {p0, v2}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setMessage(Ljava/lang/CharSequence;)V

    .line 161
    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->progressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v1, v4}, Landroid/app/ProgressDialog;->setIndeterminate(Z)V

    .line 162
    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->progressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v1, v5}, Landroid/app/ProgressDialog;->setCancelable(Z)V

    .line 163
    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->progressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v1}, Landroid/app/ProgressDialog;->show()V

    .line 165
    new-instance v1, Lcom/opongo/android/custom/SpicyDealsAddActivity$sendDealAsyncTask;

    const/4 v2, 0x0

    invoke-direct {v1, p0, v2}, Lcom/opongo/android/custom/SpicyDealsAddActivity$sendDealAsyncTask;-><init>(Lcom/opongo/android/custom/SpicyDealsAddActivity;Lcom/opongo/android/custom/SpicyDealsAddActivity$sendDealAsyncTask;)V

    new-array v2, v5, [Ljava/lang/String;

    const-string v3, ""

    aput-object v3, v2, v4

    invoke-virtual {v1, v2}, Lcom/opongo/android/custom/SpicyDealsAddActivity$sendDealAsyncTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto :goto_0
.end method

.method public onClickTakePhoto(Landroid/view/View;)V
    .locals 3
    .parameter "btn"

    .prologue
    .line 328
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.media.action.IMAGE_CAPTURE"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 329
    .local v0, intent:Landroid/content/Intent;
    const-string v1, "output"

    .line 330
    invoke-direct {p0, p0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->getTempFile(Landroid/content/Context;)Ljava/io/File;

    move-result-object v2

    invoke-static {v2}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v2

    .line 329
    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 331
    const/4 v1, 0x1

    invoke-virtual {p0, v0, v1}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->startActivityForResult(Landroid/content/Intent;I)V

    .line 332
    return-void
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 5
    .parameter "savedInstanceState"

    .prologue
    const v4, 0x7f08004c

    .line 79
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 81
    const v0, 0x7f030017

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->setContentView(I)V

    .line 90
    new-instance v0, Lcom/opongo/blogapp/manager/APIManager;

    invoke-direct {v0, p0}, Lcom/opongo/blogapp/manager/APIManager;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->apiManager:Lcom/opongo/blogapp/manager/APIManager;

    .line 92
    const-string v0, "BlogApp"

    const/4 v1, 0x0

    invoke-virtual {p0, v0, v1}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->settings:Landroid/content/SharedPreferences;

    .line 93
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->settings:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->editor:Landroid/content/SharedPreferences$Editor;

    .line 95
    invoke-virtual {p0, v4}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_name:Landroid/widget/EditText;

    .line 96
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_name:Landroid/widget/EditText;

    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->settings:Landroid/content/SharedPreferences;

    const-string v2, "edit_name"

    const-string v3, ""

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 98
    const v0, 0x7f08004e

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_email:Landroid/widget/EditText;

    .line 99
    iget-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_email:Landroid/widget/EditText;

    iget-object v1, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->settings:Landroid/content/SharedPreferences;

    const-string v2, "edit_email"

    const-string v3, ""

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 101
    invoke-virtual {p0, v4}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_name:Landroid/widget/EditText;

    .line 102
    const v0, 0x7f080036

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_title:Landroid/widget/EditText;

    .line 103
    const v0, 0x7f080038

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_content:Landroid/widget/EditText;

    .line 104
    const v0, 0x7f080041

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_price:Landroid/widget/EditText;

    .line 105
    const v0, 0x7f080043

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_link:Landroid/widget/EditText;

    .line 106
    const v0, 0x7f080045

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_date:Landroid/widget/EditText;

    .line 107
    const v0, 0x7f080047

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_code:Landroid/widget/EditText;

    .line 108
    const v0, 0x7f080049

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_discount:Landroid/widget/EditText;

    .line 109
    const v0, 0x7f08004b

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_place:Landroid/widget/EditText;

    .line 111
    const v0, 0x7f08003a

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Spinner;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_cat:Landroid/widget/Spinner;

    .line 112
    const v0, 0x7f080035

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Spinner;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_type:Landroid/widget/Spinner;

    .line 114
    const v0, 0x7f08003c

    invoke-virtual {p0, v0}, Lcom/opongo/android/custom/SpicyDealsAddActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/opongo/android/custom/SpicyDealsAddActivity;->spicydeals_image:Landroid/widget/ImageView;

    .line 115
    return-void
.end method

.method public onDestroy()V
    .locals 0

    .prologue
    .line 358
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 359
    return-void
.end method

.method public onResume()V
    .locals 0

    .prologue
    .line 352
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 353
    return-void
.end method

.method public onStart()V
    .locals 0

    .prologue
    .line 346
    invoke-super {p0}, Landroid/app/Activity;->onStart()V

    .line 347
    return-void
.end method
